package com.ciwong.epaper.bean;

import com.ciwong.mobilelib.bean.BaseBean;

/**
 * ${todo} Description of class。
 * <p>
 * ${todo} Detail Description
 * <p>
 * ${todo} Sample Code
 * 
 * <pre>
 * </pre>
 *
 * @author bin
 * @version ciwong v.1.0 2015/7/24 16:32
 * @since ciwong v.1.0
 */
public class MCTokenApplyInfo extends BaseBean
{
//    private static final long serialVersionUID = 3754379784778022504L;
    private int clientId;

    private String clientSecret;

    private String grantType = "password";

    private String userName;

    private int userId;

    private String scope = "all";

    private byte[] password;

    private int termType;

    private int appId;

    public MCTokenApplyInfo()
    {
    }

    public MCTokenApplyInfo(String userName, byte[] password, int clientId,
            String clientSecret, int termType, int appId)
    {
        this.userName = userName;
        this.password = password;
        this.clientId = clientId;
        this.clientSecret = clientSecret;
        this.termType = termType;
        this.appId = appId;
    }

    public int getClientId()
    {
        return this.clientId;
    }

    public void setClientId(int clientId)
    {
        this.clientId = clientId;
    }

    public String getClientSecret()
    {
        return this.clientSecret;
    }

    public int getAppId()
    {
        return this.appId;
    }

    public void setAppId(int appId)
    {
        this.appId = appId;
    }

    public void setClientSecret(String clientSecret)
    {
        this.clientSecret = clientSecret;
    }

    public int getUserId()
    {
        return this.userId;
    }

    public void setUserId(int userId)
    {
        this.userId = userId;
    }

    public String getGrantType()
    {
        return this.grantType;
    }

    public void setGrantType(String grantType)
    {
        this.grantType = grantType;
    }

    public String getUserName()
    {
        return this.userName;
    }

    public void setUserName(String userName)
    {
        this.userName = userName;
    }

    public String getScope()
    {
        return this.scope;
    }

    public void setScope(String scope)
    {
        this.scope = scope;
    }

    public byte[] getPassword()
    {
        return this.password;
    }

    public void setPassword(byte[] password)
    {
        this.password = password;
    }

    public int getTermType()
    {
        return this.termType;
    }

    public void setTermType(int termType)
    {
        this.termType = termType;
    }

    public boolean equals(Object o)
    {
        if (o instanceof MCTokenApplyInfo)
        {
            MCTokenApplyInfo token = (MCTokenApplyInfo) o;
            if (token != null && token.getAppId() == this.getAppId()
                    && token.getUserName() == this.getUserName())
            {
                return true;
            }
        }

        return false;
    }
}
